package com.tg.service.feign;

import com.tg.contract.dto.GetUserReq;
import com.tg.contract.dto.GetUserResp;
//import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by MagicBook on 2019/11/25.
 */
//@FeignClient(name = "user-service")
public class UserServiceImpl {
    @RequestMapping(value = "/getUser", method = RequestMethod.GET)
    public GetUserResp getUser(@RequestBody GetUserReq req) {
        GetUserResp resp = new GetUserResp();
        resp.setId(req.getUserId());
        resp.setName("tg");
        resp.setAge(30);
        return resp;
    }
}
